<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01-let</title>
</head>
<body>

</body>
<script>
    /*
       {
            let a=3;
            console.log(a);
        }
        console.log(a);
    */



 /*   var a = [];
    for (var i = 0; i < 10; i++) {
        a[i] = function () {
            console.log(i);
        };
    }
    a[6](); // 10

    var b = [];
    for (let j = 0; j < 10; j++) {
        b[j] = function () {
            console.log(j);
        };
    }
    b[6](); // 6*/



 /*   for (let i = 0; i < 3; i++) {
        let i = 'abc';
        console.log(i);
    }
    console.log(i);*/

    /*
    console.log(a);//Uncaught ReferenceError: a is not defined
    let a = 1;
    */


</script>
</html>